Apply Fixups taking too long during iOS app launch

Hello everyone,

Our iOS app is taking too long to launch. On checking the launch profile, we are seeing that most of the launch time is being spent in applying fixups which is taking more than a second and at times even more to complete.

Our deployment target is iOS 15+. We have checked using dyld_info that our binary uses chained fixups. Since chained fixups are enabled, page-in linking should also be enabled for our app as per this WWDC session.

Can someone please help us understand why the fixups application is taking this long and how can we improve it?

Thanks.

Are you launching from xcode? or a finger launch? Is this a Debug build or Release build? If a finger launch, is it the first launch or later?

dyld has an optimization for finger launching (or an launches with the extra stuff xcode inserts on launch) in which it records what it does and saves that info to a "closure" file and then on subsequent launches, it uses that closure file to greatly speed up the launch. If the backtraces show any JustInTimeLoader methods then you are not in the use-closure case.

Some C++ apps have tons of external weak-def symbols in their Debug builds which cause dyld to spend a lot of time searching for duplicate symbols to coalesce.

Apply Fixups taking too long during iOS app launch
 
 
Q